package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProjectExpertPriorMapper;
import com.ruoyi.system.domain.SysProjectExpertPrior;
import com.ruoyi.system.service.ISysProjectExpertPriorService;

/**
 * 优先专家Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-02
 */
@Service
public class SysProjectExpertPriorServiceImpl implements ISysProjectExpertPriorService 
{
    @Autowired
    private SysProjectExpertPriorMapper sysProjectExpertPriorMapper;

    /**
     * 查询优先专家
     * 
     * @param id 优先专家主键
     * @return 优先专家
     */
    @Override
    public SysProjectExpertPrior selectSysProjectExpertPriorById(Long id)
    {
        return sysProjectExpertPriorMapper.selectSysProjectExpertPriorById(id);
    }

    /**
     * 查询优先专家列表
     * 
     * @param sysProjectExpertPrior 优先专家
     * @return 优先专家
     */
    @Override
    public List<SysProjectExpertPrior> selectSysProjectExpertPriorList(SysProjectExpertPrior sysProjectExpertPrior)
    {
        return sysProjectExpertPriorMapper.selectSysProjectExpertPriorList(sysProjectExpertPrior);
    }

    /**
     * 新增优先专家
     * 
     * @param sysProjectExpertPrior 优先专家
     * @return 结果
     */
    @Override
    public int insertSysProjectExpertPrior(SysProjectExpertPrior sysProjectExpertPrior)
    {
        sysProjectExpertPrior.setCreateTime(DateUtils.getNowDate());
        return sysProjectExpertPriorMapper.insertSysProjectExpertPrior(sysProjectExpertPrior);
    }

    /**
     * 修改优先专家
     * 
     * @param sysProjectExpertPrior 优先专家
     * @return 结果
     */
    @Override
    public int updateSysProjectExpertPrior(SysProjectExpertPrior sysProjectExpertPrior)
    {
        sysProjectExpertPrior.setUpdateTime(DateUtils.getNowDate());
        return sysProjectExpertPriorMapper.updateSysProjectExpertPrior(sysProjectExpertPrior);
    }

    /**
     * 批量删除优先专家
     * 
     * @param ids 需要删除的优先专家主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectExpertPriorByIds(Long[] ids)
    {
        return sysProjectExpertPriorMapper.deleteSysProjectExpertPriorByIds(ids);
    }

    /**
     * 删除优先专家信息
     * 
     * @param id 优先专家主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectExpertPriorById(Long id)
    {
        return sysProjectExpertPriorMapper.deleteSysProjectExpertPriorById(id);
    }
}
